package org.aceor.mddal.common.monitor.handler;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Arrays;

/**
 * Created by lxue on 16/4/27.
 */
public class CommonLogExecuteTimeHandler implements MonitorPointHandler {
    private static final Logger logger = LoggerFactory.getLogger(CommonLogExecuteTimeHandler.class);

    @Override
    public long threshold() {
        return 0;
    }

    @Override
    public void print(long costTime, String[] params) {
        logger.info("Monitor ==> execute costs :{}ms, extraParams :{}", costTime, (null == params || params.length == 0) ? "EMPTY" : Arrays.toString(params));
    }
}
